﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace SumPower.MailAccount.Web.Controllers
{
    public class UserController : Controller
    {
        [AllowAnonymous]
        public ActionResult Identifier(string name)
        {
            if (Request.AcceptTypes != null && Request.AcceptTypes.Contains("application/xrds+xml"))
            {
                return Xrds(name);
            }
            return View();
        }

        public ActionResult Xrds(string name)
        {
            Response.ContentType = "application/xrds+xml";
            ViewBag.ServiceUri = new Uri(Request.Url, Url.Action("Provider", "OpenId"));
            return View("Xrds");
        }
    }

}
